/* dline.c by bill buckels 2009           */
/* a graphics demo for the apple II       */
/* written in Manx Aztec C65 Version 3.2b */
/* runs under DOS 3.3                     */
/* Draws Double Hi-Res lines and fonts    */

#include <g3.h>

int dhrbox(x1,y1,x2,y2,drawcolor)
int x1,y1,x2,y2,drawcolor;
{
	int x, y, xmax,ymax;

    ymax = y2+1;
	for (y = y1; y < ymax; y++) {
		dhrplot(x1,y,drawcolor);
	    dhrplot(x2,y,drawcolor);
	}

	xmax=x2+1;
	for (x = x1; x < xmax; x++) {
		dhrplot(x,y1,drawcolor);
	    dhrplot(x,y2,drawcolor);
	}

	return 0;
}



int main()
{

 int c,idx,jdx,y2,x2;

 crt80();
 /* set double hires */
 setcrtmode(DHRMODE);
 for(jdx=0;jdx<16;jdx++) {
	dhrflood(0,0,79,191,0);
	for (idx = 0; idx < 16; idx++) {
		c = idx * 4;
		x2 = 139-c;
		y2 = 191-c;
	    dhrbox(c,c,x2,y2,jdx);
    }
    if (jdx!=15)dhrfont("Press any key...",91,70,jdx,15,1,'M');
    else dhrfont("Press any key...",91,70,jdx,0,1,'M');
    if (getch()==27)break;


 }

  setcrtmode(TEXT80);
  scr_apple();
  return 0;

}

